package model
{
	import mx.collections.ArrayCollection;

	[Bindable]
	[RemoteClass(alias="model.Hotel")]
	public class Hotel
	{
		public var serialVersionUID:Number;
		public var id:Number;
		public var nome:String;
		public var gerente:String;
		public var quartos:ArrayCollection;
		
		public function Hotel()
		{
		}
		
		public function getQuartosLivres():ArrayCollection{
			
			var quartosLivres:ArrayCollection = new ArrayCollection();
			
			for each(var q:Quarto in this.quartos){
				if(!q.ocupado)
					quartosLivres.addItem(q);
			}
			
			return quartosLivres;
		}
		
	}
}